@CONTAINER_WITH_BORDER_OFFSET: 7px;

@BORDER_PADDING: 1px;
@CONTAINER_PADDING: @BORDER_PADDING @BORDER_PADDING @BORDER_PADDING @CONTAINER_WITH_BORDER_OFFSET;

@NODE_OFFSET: 26px;

@ITEM_WITH_CHECKBOX_OFFSET: 32px;

@CHECKBOX_OFFSET: 29px;

@SELECT_ALL_ITEM_OFFSET: 29px;
@SELECT_ALL_TEXT_OFFSET: 28px;
@SELECT_ALL_ITEM_LEFT_PADDING: @SELECT_ALL_ITEM_OFFSET + @CONTAINER_WITH_BORDER_OFFSET;

@WIN8_TREEVIEW_LOADINCICATOR_OFFSET_TOP: 10px;
@WIN8_TREEVIEW_LOADINCICATOR_OFFSET_LEFT: 3px;
@WIN8_TREEVIEW_LOADINCICATOR_SIZE: 18px;

@WIN8_TREEVIEW_ARROW_ICON_SIZE: 15px;

.dx-treeview-node-loadindicator {
    top: @WIN8_TREEVIEW_LOADINCICATOR_OFFSET_TOP;
    left: @WIN8_TREEVIEW_LOADINCICATOR_OFFSET_LEFT;
    width: @WIN8_TREEVIEW_LOADINCICATOR_SIZE;
    height: @WIN8_TREEVIEW_LOADINCICATOR_SIZE;
}

.dx-treeview {
    &.dx-treeview-border-visible {
        border: 1px solid @WIN8_TREE_VIEW_BORDER_COLOR;

        .dx-treeview-select-all-item {
            padding-left: @SELECT_ALL_ITEM_LEFT_PADDING;
        }

        .dx-scrollable-content {
            >.dx-treeview-node-container {
                padding: @CONTAINER_PADDING;
            }
        }
    }

    .dx-treeview-select-all-item {
        margin: 0 0 7px 0;
        border-bottom: 1px solid @WIN8_TREE_VIEW_BORDER_COLOR;
        padding: 9px 0 11px @SELECT_ALL_ITEM_OFFSET;

        .dx-checkbox-text {
            padding-left: 28px;
        }
    }

    .dx-treeview-node {
        padding-left: @NODE_OFFSET;

        &.dx-treeview-item-with-checkbox {
            .dx-treeview-item {
                padding-left: @ITEM_WITH_CHECKBOX_OFFSET;
            }
        }

        .dx-checkbox {
            top: 9px;
            left: @CHECKBOX_OFFSET;
            background-color: transparent;
        }
    }

    .dx-treeview-item {
        padding: 8px 6px 8px 3px;
        min-height: 34px;
        color: @WIN8_TREE_VIEW_TEXT_COLOR;

        .dx-icon {
            .dx-icon-sizing(24px);
        }

        &.dx-state-hover {
            background-color: @WIN8_TREE_VIEW_HOVERED_STATE_BACKGROUND;
            color: @WIN8_TREE_VIEW_HOVERED_STATE_COLOR;
        }
    }

    .dx-state-focused > .dx-treeview-item {
        background-color: @WIN8_TREE_VIEW_FOCUSED_BACKGROUND;
        color: @WIN8_TREE_VIEW_FOCUSED_COLOR;
    }

    .dx-treeview-toggle-item-visibility {
        .dx-icon-chevronright;
        .dx-icon-font-centered-sizing(@WIN8_TREEVIEW_ARROW_ICON_SIZE);
        width: 21px;
        height: 38px;
        top: 0;
        left: 0;

        &.dx-treeview-toggle-item-visibility-opened {
            .dx-icon-chevrondown;
        }
    }

    &.dx-rtl {
        .dx-treeview > .make-rtl(@CONTAINER_WITH_BORDER_OFFSET, @NODE_OFFSET, @ITEM_WITH_CHECKBOX_OFFSET, @CHECKBOX_OFFSET, @SELECT_ALL_TEXT_OFFSET, @SELECT_ALL_ITEM_LEFT_PADDING, @BORDER_PADDING);
    }
}
